package Model;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.HashSet;
import java.util.Set;

public class SanPham implements Serializable{
	
	private String ten;
	private BigInteger gia;
	private String cpu;
	private String ram;
	private String hdd;
	private String manHinh;
	private String doHoa;
	private String oDia;
	private String wifi;
	private String webcam;
	private String pin;
	private String hdh;
	private String hinh;
	private String khuyenMai;
	private int soLuong;
	private String baoHanh;
	private NhaSanXuat nhasanxuat;
	private Set<HoaDon> dshd  = new HashSet<HoaDon>();
	
	
	public Set<HoaDon> getDshd() {
		return dshd;
	}
	public void setDshd(Set<HoaDon> dshd) {
		this.dshd = dshd;
	}
	public String getBaoHanh() {
		return baoHanh;
	}
	public void setBaoHanh(String baoHanh) {
		this.baoHanh = baoHanh;
	}
	
	public void setNhasanxuat(NhaSanXuat nhasanxuat) {
		this.nhasanxuat = nhasanxuat;
	}
	
	public NhaSanXuat getNhasanxuat() {
		return nhasanxuat;
	}
	
	public SanPham(){
	}
	
	public SanPham(String hinh){
		this.hinh = hinh;
	}
	
	public SanPham(String ten, BigInteger gia, String cpu, String ram,
			String hdd, String manHinh, String doHoa, String oDia, String wifi,
			String webcam, String pin, String hdh, String hinh,
			String khuyenMai,String baoHanh) {
		this.ten = ten;
		this.gia = gia;
		this.cpu = cpu;
		this.ram = ram;
		this.hdd = hdd;
		this.manHinh = manHinh;
		this.doHoa = doHoa;
		this.oDia = oDia;
		this.wifi = wifi;
		this.webcam = webcam;
		this.pin = pin;
		this.hdh = hdh;
		this.hinh = hinh;
		this.khuyenMai = khuyenMai;
		this.baoHanh = baoHanh;
	}
	public String getKhuyenMai() {
		return khuyenMai;
	}
	public void setKhuyenMai(String khuyenMai) {
		this.khuyenMai = khuyenMai;
	}
	public int getSoLuong() {
		return soLuong;
	}
	public void setSoLuong(int soLuong) {
		this.soLuong = soLuong;
	}
	public String getTen() {
		return ten;
	}
	public void setTen(String ten) {
		this.ten = ten;
	}
	public BigInteger getGia() {
		return gia;
	}
	public void setGia(BigInteger gia) {
		this.gia = gia;
	}
	public String getCpu() {
		return cpu;
	}
	public void setCpu(String cpu) {
		this.cpu = cpu;
	}
	public String getRam() {
		return ram;
	}
	public void setRam(String ram) {
		this.ram = ram;
	}
	public String getHdd() {
		return hdd;
	}
	public void setHdd(String hdd) {
		this.hdd = hdd;
	}
	public String getManHinh() {
		return manHinh;
	}
	public void setManHinh(String manHinh) {
		this.manHinh = manHinh;
	}
	public String getDoHoa() {
		return doHoa;
	}
	public void setDoHoa(String doHoa) {
		this.doHoa = doHoa;
	}
	public String getoDia() {
		return oDia;
	}
	public void setoDia(String oDia) {
		this.oDia = oDia;
	}
	public String getWifi() {
		return wifi;
	}
	public void setWifi(String wifi) {
		this.wifi = wifi;
	}
	public String getWebcam() {
		return webcam;
	}
	public void setWebcam(String webcam) {
		this.webcam = webcam;
	}
	public String getPin() {
		return pin;
	}
	public void setPin(String pin) {
		this.pin = pin;
	}
	public String getHdh() {
		return hdh;
	}
	public void setHdh(String hdh) {
		this.hdh = hdh;
	}
	public String getHinh() {
		return hinh;
	}
	public void setHinh(String hinh) {
		this.hinh = hinh;
	}
	
	
	@Override
	public boolean equals(Object obj) {
		SanPham that = (SanPham) obj;
		
		return (
			 this.ten.equalsIgnoreCase(that.ten)
				);
	}
	
}
